from flask import Flask
from wtforms import Form
from wtforms import StringField, PasswordField, BooleanField, SubmitField
from wtforms.validators import DataRequired
from wtforms.validators import Length
from wtforms.validators import Email


class LoginForm(Form):
    # 验证器
    username = StringField("Username", validators=[DataRequired(), Email(), Length(2, 20)])
    password = PasswordField('Password')
    remember_me = BooleanField('Remember Me')
    submit = SubmitField('Sign In')
